package com.wxtt.android.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

import com.fast.dev.frame.ui.Bind;
import com.fast.dev.frame.utils.StringUtils;
import com.wxtt.android.R;
import com.wxtt.android.common.CommonActivity;

/**
 * 说明：展示显示的图片
 * <p/>
 * 作者：fanly
 * <p/>
 * 时间：2016/2/15 22:25
 * <p/>
 * 版本：verson 1.0
 */
public class ShowImageActivity extends CommonActivity {

    @Bind(id = R.id.iv_show_image,click = true)
    ImageView iv_show_image;
    @Bind(id = R.id.btn_save_image,click = true)
    Button btn_save;
    @Bind(id = R.id.btn_share_image,click = true)
    Button btn_share;

    @Override
    public int setRootView() {
        return R.layout.activity_show_image;
    }

    @Override
    public void onInit(Bundle bundle) {
        super.onInit(bundle);
        String url = getIntent().getExtras().getString("url");
        if (StringUtils.isEmpty(url)){
            return;
        }
//        V.setImageView(this,iv_show_image,url);
    }

    @Override
    public void clickView(View v) {
        super.clickView(v);
        switch (v.getId()){
            case R.id.btn_save_image:
                //保存图片
                shortToast("保存成功");
                break;
            case R.id.btn_share_image:
                //分享图片
                shortToast(R.string.share_image);
                break;
            case R.id.iv_show_image:
                finish();
                break;
        }
    }
}
